ࡱ> vxu7 mHbjbjUU p7|7|kDl& 8  !|&Cn!$""""#C%%D_=a=a=a=7=h@8C$%E EG\C &## & &\C'""qC''' &""_=' &_=''-rH1 ;"! gC& !&N;;dC0C;Go'G;'&& HYPERLINK "F:\\DigiPen\\Fall2003\\CS420\\Lectures\\Audio\\Sampling.htm"Previous lectureHYPERLINK "F:\\DigiPen\\Fall2003\\CS420\\Lectures\\GIF\\Huffman.htm"Next LectureHYPERLINK "F:\\DigiPen\\Fall2003\\CS420\\Lectures\\420Syllabus.htm"SyllabusHomework CAD (Computer Aided Drawing/Design) About 1980, architectural or mechanical engineering drawings were either done by hand on drafting tables or else on Unix computer workstations costing $20,000 to $30,000 per seat. When the IBM PC appeared (1981), it was an underpowered machine with a monochrome monitor designed for text or simple drawings. AutoCAD from Autodesk, Inc. was one of the first CAD packages that ran on the PC. The software was priced at about $2000 and up; the computer would cost about another $3000. The first releases of AutoCAD were 2D. The software provided a major incentive for hardware vendors to improve the graphics capability of the PC from the original 4 color 640 x 200 CGA (Color Graphics Adapter). With improvements in PC hardware and graphics, and upgrades of AutoCAD to a full 3D capability, AutoCAD became the leader for architectural and mechanical drawing. Large companies with Unix based CAD drawings needed a way to port them to their newer cheaper PC work-stations. Two solutions were provided: The native format for AutoCAD drawings is a .DWG file. AutoDesk discourages outside parties from manipulating these files directly. Instead, they supply a .DXF (drawing exchange format) that is well documented and supported by multiple vendors. There is an ANSI standard for the interchange of high quality CAD drawings. This is IGES (Initial Graphics Exchange Specification). CAD drawings have a different set of problems from the bit-mapped images that we have considered thus far. CAD must be precise. When you draw two lines that join at a corner, you need to specify the exact point where they meet and the exact geometry of the corner; for instance is it square or rounded? CAD drawings may be used as the trace paths for printed circuit boards, masks for integrated circuits, or instructions to milling machines. IGES is more suited to high-end systems than PCs. It is about four times as complicated as DXF and the specification runs to over 500 pages. DXF AutoCAD is a very nice package for sophisticated design. [examples] It is still expensive. However, there is a cheaper drawing product, AutoSketch ($99 list; academic discount available) that will read and write both .DWG and .DXF files, as well as export JPEG. Most AutoDesk products (including 3D Studio Max) support DXF. Most CAD packages from other vendors support DXF. Even more reasonably priced is Design Workshop from Artifice, Inc ( HYPERLINK "http://www.artifice.com" www.artifice.com). The Lite version is free! It lets you play with 3D models and drawings. It can import and export DXF files. CAD files are vector based graphics, not bitmaps. They describe the exact coordinates for lines, planes, arcs, etc. Rendering information for colors and textures is usually included. CAD drawings are typically done in layers. For 2D, each layer may represent a different color and line style (solid, dashed, dotted, etc.). You might have all the text labels on one layer and the dimensional information on another. You can turn layers on or off to select what you want to display. You can change the rendering to see textured surfaces or wire-frame. For 3-D, it is up to the software to set a point of view and remove hidden lines or surfaces. Thus the same drawing can be rendered in many different ways. The native .DWG format is designed to be compact. The DXF format is designed for maximum portability. Thus it is in ASCII and is less compressed that the corresponding DWG file. 3D Models for Animation 3D animation models are typically produced using 3D Studio Max or Maya. These packages are very nice, but expensive. They have the capability of importing or exporting DXF files. A low cost alternative is the share-ware program MilkShape 3D. You can download a 30 day evaluation copy from  HYPERLINK "http://www.swissquake.ch/chumbalum-soft/" http://www.swissquake.ch/chumbalum-soft/ . If you decide to keep it, it costs $25. Documentaion and plug-ins can be downloaded. A good overview of how to use MilkShape is given in Clayton Crooks, 3D Game Programming with DirectX 8.0, ISBN 1-58450-086-7. The CD that comes with the book contains release 1.5.9 of MikShape. The beta for release 1.7.0 came out Oct 14, 2003. In addition to letting you set up 3D animations, Milkshape converts between lots of game formats. These include: AutoCad DXF 3D Studio ASC Wavefront OBJ Lightwave LWO Quake Unreal Tournament HalfLife Sims Max Payne Serious Sam Playstation VRML DXF File organization Sections: Header Tables Blocks Classes Object Entities EOF The Classes and Objects blocks are fairly new and can be omitted. The other four sections should be present to keep DXF readers happy. DXF files consist of pairs of (group code, value). The group code is an integer that gives the type for the value. All DXF entries are in ASCII and are on separate lines. RangeType0-9String10-59Floating-point60-79Integer210-239Floating-point999Comment Group codes Group code Value type 0 Identifies the start of an entity, table entry, or file separator. The text value that follows indicates which. 1 The primary text value for an entity. 2 A name; Attribute tag, Block name, etc. 3-4 Other textual or name values. 5 Entity handle expressed as a hexadecimal string. 6 Line type name (fixed). 7 Text style name (fixed). 8 Layer name (fixed). 9 Variable name identifier (used only in HEADER section of the DXF file). 10 Primary X coordinate (start point of a Line or Text entity, center of a Circle, etc.). 11-18 Other X coordinates. 20 Primary Y coordinate. 2n values always correspond to 1n values and immediately follow them in the file. 21-28 Other Y coordinates. 30 Primary Z coordinate. 3n values always correspond to 1n and 2n values and immediately follow them in the file. 31-37 Other Z coordinates. 38 This entity's elevation if nonzero (fixed). Output only if system variable FLATLAND is set to 1. 39 This entity's thickness if nonzero (fixed). 40-48 Floating-point values (text height, scale factors, etc.). 49 Repeated value - multiple 49 groups may appear in one entity for variable length tables (such as the dash lengths in the LTYPE table). A 7x group always appears before the first 49 group to specify the table length. 50-58 Angles. 62 Color number (fixed). 66 "Entities follow" flag (fixed). 70-78 Integer values, such as repeat counts, flag bits, or modes. 210, 220, 230 X, Y, and Z components of extrusion direction. 999 Comments Header It is common for the first line of a DXF file to contain a comment, using group code 999. A standard convention is to describe the creator of the DXF file in this comment. The header section contains general information about the drawing such as: version numbers (of AutoCAD) unit specification (inches, mm, meters, etc.) current layer (new items will show up in the current layer) grid spacing (new items can be constrained to lie on grid points) tolerances (line widths, etc.) drawing bounds fill mode and pattern Programs that read DXF files will have sensible defaults for these parameters. For a complete list of header variables, see the AutoCAD documentation for  HYPERLINK "Dxf.txt" Release 10 or  HYPERLINK "html14\\header_section_al_u05_c.htm" Release 14. Headers have a 9 group followed by the variable name, followed by groups giving the value. Tables Tables are used to specify: line types (Solid, dashed, dotted, various dash-dot combinations) text styles (size and font) layers (Each layer has a color and line type and can be selectively turned on and off) view tables (how the 3D scene gets projected to a 2D image) user coordinate systems (UCS) relative to world coordinate system(WCS) Table order is flexible, but the LTYPE should come before LAYERS. Not all programs that support DXF import will support layers and those that do usually insist on the layers being defined before use. Each table is introduced with a 0 group with the label "TABLE" followed by a 2 group identifying the particular table and a 70 group with the maximum number of table entries. After this table header come the table entries. Each table item starts with a 0 group with the particular table, a 2 group for the name of the table entry, and a 70 group with flags. Additional groups vary based on the table type. Consult the documentation for  HYPERLINK "Dxf.txt" Release 10 or  HYPERLINK "html14\\tables_section_al_u05_c.htm" Release 14 Tables end with a 0 group and ENDTAB. Entities The  HYPERLINK "html14\\entities_section_al_u05_c.htm" entities section is where the actual drawing is defined. These groups may appear in various orders. A DXF reader should be table driven, order independent, and ignore unrecognized groups. Each entity begins with a 0 group identifying the entity type, then an 8 group with the name of the layer where the entity resides. An entity may have its own color thickness line type elevation or it can take these values from its layer. Some of the more important entities are: LINE 10, 20, 30 (start point), 11, 21, 31 (end point). POINT 10, 20, 30 (point) CIRCLE 10, 20, 30 (center), 40 (radius). ARC 10, 20, 30 (center), 40 (radius), 50 (start angle), 51 (end angle). SOLID Four points defining the corners of the solid: (10, 20, 30), (11, 21, 31), (12, 22, 32), and (13, 23, 33). If only three points were entered (forming a triangular solid), the third and fourth points will be the same. 3DLINE 10, 20, 30 (start point), 11, 21, 31 (end point). 3DFACE Four points defining the corners of the face: (10, 20, 30), (11, 21, 31), (12, 22, 32), and (13, 23, 33). 70 (invisible edge flags -optional 0). If only three points were entered (forming a triangular face), the third and fourth points will be the same. The meanings of the bit-coded "invisible edge flags" are shown in the following table. Flag bit value Meaning 1 First edge is invisible 2 Second edge is invisible 4 Third edge is invisible 8 Fourth edge is invisible SHAPE 10, 20, 30 (insertion point), 40 (size), 2 (shape name), 50 (rotation angle -optional 0), 41 (relative X scale factor -optional 1), 51 (obliquing angle -optional 0). Wcvt2pov Wcvt2pov is freeware distributed on the CD with the text on \Software\pc\mswin31\wcvt2pov. It provides a way of displaying DXF files, but it only supports a subset. The wcvt2pov utility converts 3D files for use with the Persistence of Vision Ray Tracer (POV-Ray), which is also freeware. Wcvt2pov converts among several 3D formats. These include: dxf (AutoCAD) pov, inc (POV-Ray) wrl (Virtual Reality Markup Language) 3ds, asc (3D Studio) obj (Wavefront) Wcvt2pov supports only a small subset of DXF; mainly the 3DFACES entity. DXF files that contain only 2D drawing data will display as blank under wcvt2pov. The TEXT entity TEXT 10, 20, 30 (insertion point), 40 (height), 1 (text value), 50 (rotation angle -optional 0), 41 (relative X scale factor -optional 1), 51 (obliquing angle -optional 0), 7 (text style name -optional "STANDARD"), 71 (text generation flags -optional 0), 72 (justification type -optional 0), 11, 21, 31 (alignment point -optional, appears only if 72 group is present and nonzero). The "text generation flags" are a bit-coded field with mean- ings as follows: Flag bit value Meaning 2 Text is backwards (mirrored in X) 4 Text is upside down (mirrored in Y) The "justification type" value (not bit-coded) indicates the text justification style used on this entity, as shown in the following table. Value Meaning 0 Text is left justified 1 Text is centered along its baseline 2 Text is right justified 3 Text is aligned between two points (height varies) 4 Text is "middle" (fully) centered 5 Text is fit between two points (width varies) If the justification is anything other than 0 (left justi- fied), 11, 21, and 31 groups will also appear in the entity to specify the alignment point of the text (center, right- most, or second alignment point). The POLYLINE Entity POLYLINE 66 ("vertices follow flag"), 70 (Polyline flags), 40 (default starting width), 41 (default ending width), 71 and 72 (polygon mesh M and N vertex counts -optional 0), 73 and 74 (smooth surface M and N densities -optional 0), 75 (smooth surface type -optional 0). The default widths apply to any vertex that doesn't supply widths (see below). The "vertices follow" flag is always 1, indicating that a series of VERTEX entities is expected to follow the POLYLINE, terminated by a sequence end (SEQEND) entity. The "polyline flags" group is a bit-coded field with bits defined as follows: Flag bit value Meaning 1 This is a closed Polyline (or a polygon mesh closed in the M direction) 2 Curve-fit vertices have been added 4 Spline-fit vertices have been added 8 This is a 3D Polyline 16 This is a 3D polygon mesh. Group 75 indi- cates the smooth surface type, as follows: 0 = no smooth surface fitted 5 = quadratic B-spline surface 6 = cubic B-spline surface 8 = Bezier surface 32 The polygon mesh is closed in the N direc- tion VERTEX 10, 20, 30 (location), 40 (starting width -optional, see above), 41 (ending width -optional, see above), 42 (bulge), 70 (vertex flags), 50 (curve fit tangent direction -optional). The bulge is the tangent of 1/4 the included angle for an arc segment, made negative if the arc goes clockwise from the start point to the end point; a bulge of 0 indicates a straight segment, and a bulge of 1 is a semicir- cle. The meanings of the bit-coded "vertex flags" are shown in the following table. Flag bit value Meaning 1 Extra vertex created by curve fitting 2 Curve fit tangent defined for this vertex. A curve fit tangent direction of 0 may be omitted from the DXF output, but is signif- icant if this bit is set. 4 Unused (never set in DXF files) 8 Spline vertex created by spline fitting 16 Spline frame control point 32 3D Polyline vertex 64 3D polygon mesh vertex SEQEND No fields. This entity marks the end of vertices (VERTEX type name) for a Polyline, or the end of Attribute entities (ATTRIB type name) for an INSERT entity that has Attributes (indicated by 66 group present and nonzero in INSERT entity). EXAMPLE  HYPERLINK "vision3d.doc" Vision3D.doc  [annotated] or  HYPERLINK "vision3d.dxf" Vision3D.dxf This drawing has two 3D faces and a line: Face 1 is a square in the plane z = -0.5. (-.5,-.5,-.5) (-.5, +.5, -.5) (+.5, +.5, -.5) (+.5, -.5, -.5) Face 2 is a triangle that joins the square on a line. It lies in the plane y = -0.5. A 3D triangle has the third and fourth vertex the same. (-.5,-.5,-.5) (+.5, -.5, -.5) (0, -.5, +.5) (0, -.5, +.5) The line joins the vertex of the triangle that is non-coplanar with the square to a point that does not lie on either of the other two polygons. The line is in the plane x = 0.(0, -.5, +.5) (0, +.5, -.5) HYPERLINK "..\\RLE\\Huffman.doc"Previous lectureHYPERLINK "..\\GIF\\LZ.doc"Next Lecture HYPERLINK "..\\320Syllabus.doc" SyllabusHYPERLINK "..\\..\\Homework\\Week12\\cs320_week12.doc"Homework IJK[\]^NOPxy;IT d"&#'#<#=#>#H#I#M#N##j>*B*Uph0J j0JU CJOJQJ5>* B*ph5>*B*ph6]jU \]^JjUjAUjU0J jU jU8]   1 ge$$Ifl\:,"04 la$If kHlH  Z [ ' 2 ghWX#$<H  & F & FHVdrx & F  & F & F & F & F & F & FHIOTUWY[b8 $$Ifa$<$$If04 4pa$If $$Ifa$ bcfhkz{~`Dh<$If $$Ifa$b$$If\R4 RRpa; ab$$If\R4 RRpa$If $$Ifa$a>]7?Xp " a `a z { 0!|!!!"E"d"s"""##$P$l$$$F%G% & F & F & F & F & F & F & F & F & F  & F  & F  & F #######&'''''''''"(#($(.(/(0(c(d((((((EEE E!E.E/E@EAE[E\E]EiEjEGGGGGGGGGGGӷjg UjUjUj0Uj|U jUj>*B*Uphj>*B*Uph0J CJOJQJ56CJOJQJ0J j0JUjm>*B*Uph6G%&&&0(V(_(X)))***r*s*****++Q+R+++,,\,], & F & F & F],,,,--u--.<.=.t...//n/o///90C0111112223 & F3L333"4f444444'5j5555C6`6a6666%7m7777/8w88889d:e:::>;;;;<D<<<<@====>=>o>p>>>> ?h? 0^`0h???1@{@@ A1A2AiAAA;BBBB=CuCCCC DhDDDDE@EkElElEEEEUFFFGGGG%HhH$If GGGGGGHHH#H$H%H&H\H]H^HfHgHmHj Uj U0J jUhHiHjHkHlHmHommmm$$Ifl\:,"04 la/ =!"#$%DyK FAudio\Sampling.htmDyK FGIF\Huffman.htmDyK F420Syllabus.htmDyK www.artifice.comyK 2http://www.artifice.com/DyK )http://www.swissquake.ch/chumbalum-soft/yK Rhttp://www.swissquake.ch/chumbalum-soft/DyK FDxf.txtDxf.txtDyK F#html14\header_section_al_u05_c.htmDyK FDxf.txtDxf.txtDyK F#html14\tables_section_al_u05_c.htmDyK F%html14\entities_section_al_u05_c.htmDyK F vision3d.docvision3d.docDyK F vision3d.dxfvision3d.dxfDyK FRLE\Huffman.doc$RLE\Huffman.docDyK F GIF\LZ.docGIF\LZ.docDyK F320Syllabus.docDyK F!Homework\Week12\cs320_week12.doc% iP@PNormal*$5$7$8$9DH$CJ_HmHnHsH tH uL@L Heading 1$ & F<@&5CJ OJQJN@N Heading 2$ & F<@&56CJOJQJ<A@< Default Paragraph Font8&@8 Footnote ReferenceH*FOF WW-Default Paragraph FontCJ.O. WW-Hyperlink>*B*>O!> WW-FollowedHyperlink>*B* 2O12 WW8Num1z0CJOJQJkH*2OA2 WW8Num2z0CJOJQJkH*2OQ2 WW8Num3z0CJOJQJkH*2Oa2 WW8Num4z0CJOJQJkH*2Oq2 WW8Num5z0CJOJQJkH*2O2 WW8Num6z0CJOJQJkH*2O2 WW8Num8z0CJOJQJkH*4O4 Internet link >*B* CJ:O:Heading $x CJOJQJ*O* Text bodyx:O: WW-Plain Text CJOJQJ0O0Table Contents:O: Table Heading$a$56.U@. Hyperlink >*B*ph>V@> FollowedHyperlink >*B* phDC@"DBody Text Indent"0^`0,@2,Header # !, @B,Footer $ !mDp]   1Z[' 2 g h W X   #$<HVdrxHIOTUWY[bcfhkz{~; a>]7?Xp "az{0|Eds P l F!G!"""0$V$_$X%%%&&&r&s&&&&&''Q'R''',(\(]((((-)u))*<*=*t***/+n+o+++9,C,-----.../L///"0f000000'1j1111C2`2a2222%3m3333/4w4445d6e666>77778D8888@9999:=:o:p:::: ;h;;;1<{<< =1=2=i===;>>>>=?u???? @h@@@@A@AkAlAAAAUBBBCCCC%DhDiDjDnD0000000 00 0 0  0  0 0 0 0 0  0   0  0000000000000 000000000000000000 0   0  0 0 0 0 0 0[ 0Z 00000000000000000000000000000000000 0   0  0000000000000000000000000000000000000 0  00 0 0 0  0  0  0  0 0000 0 0 0 0 0000000 0  0n 0n  0n  0n  0n  0n 000000000000000000000000000000000 00 0 0 0 0 00 00000000000000000000000000000000 0000000000000000000000000000000000000000000000000000 0000000000000000000#GmH%/6 Hbaa G%],38h?lEhHmH&()*+,-.0123457lH'J[] Ox&=HM#####$.$c$$$A A.A@A\AiACCCCCCCD#D%D]DfDmDXXXXXXXXXXXXXXXX8@0(  B S  ? _Hlt499526062 _Hlt499526063 _Hlt498313672 _Hlt498313673 _Hlt498701962 _Hlt498930569 _Hlt498930570 _Hlt498326567 _Hlt498326568 _Hlt499528132DXF _Hlt499534194 _Hlt499534195 _Hlt526073919 _Hlt51050842 _Hlt513537368PP$$(A)ACnD@@@@@@@@ @ @ @ @@@QQ$$)A*ACnDnDK\ h V ;<GHUVcdqrwx#/$!A?A]AjACCnDjDnD Tyler FolsomZC:\WINNT\Profiles\TFolsom\Application Data\Microsoft\Word\AutoRecovery save of cad_dxf.asd Tyler FolsomZC:\WINNT\Profiles\TFolsom\Application Data\Microsoft\Word\AutoRecovery save of cad_dxf.asd Tyler Folsom)C:\DigiPen\CS320\Lectures\Dxf\cad_dxf.doc Tyler Folsom)C:\DigiPen\CS320\Lectures\Dxf\cad_dxf.docTyler C. Folsom!G:\CS320\Lectures\DXF\CAD_dxf.doctfolsom1D:\DigiPen\Sum2001\CS320\Lectures\Dxf\CAD_dxf.doc Tyler Folsom2D:\DigiPen\Fall2001\CS320\Lectures\Dxf\CAD_dxf.doc Tyler Folsom2D:\DigiPen\Fall2001\CS320\Lectures\Dxf\cad_dxf.doc DigiPen UserZC:\Winnt\Profiles\tfolsom\Application Data\Microsoft\Word\AutoRecovery save of cad_dxf.asd DigiPen User%Y:\www\CS420\Lectures\Dxf\cad_dxf.docPfD1N`cpcd 6@*@h^`)h ^`OJQJo(h ^`OJQJo(oh pp^p`OJQJo(h @ @ ^@ `OJQJo(h ^`OJQJo(oh ^`OJQJo(h ^`OJQJo(h ^`OJQJo(oh PP^P`OJQJo(D1NAA`BB0CCDhDD8EEFpFF@GGHxHHHIIJJ pcdA @h h^h`OJQJo(B v@h h^h`OJQJo(lB v@h h^h`OJQJo(B v@h h^h`OJQJo(-'..\..\Homework\Week12\cs320_week12.doc .*..\320Syllabus.docY'..\GIF\LZ.docq3$..\RLE\Huffman.doc! vision3d.dxf  vision3d.doci%html14\entities_section_al_u05_c.htm k#html14\tables_section_al_u05_c.htmv.Dxf.txtt#html14\header_section_al_u05_c.htmv.Dxf.txtJU )http://www.swissquake.ch/chumbalum-soft/IU http://www.artifice.com/+..\420Syllabus.htmo'..\GIF\Huffman.htmE..\Audio\Sampling.htm  !"#$%&'()*+,-./012345678:;<=>?@BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfghijklnopqrstwRoot Entry F؄CyData 91TableAGWordDocumentpSummaryInformation(eDocumentSummaryInformation8mCompObjjObjectPool؄C؄C  FMicrosoft Word Document MSWordDocWord.Document.89q